{include file="common/head"}
<head>
<title>评价榜</title>

<style>
.form-control{width: initial;display: inline-block;}  
</style>
</head>
<body style="">


<div class=" "  style="border:0 solid #ccc;padding: 10px;"  >
    <form action="/index.php/assess/index" method="post">
    <div class="row" id="query_bar" style="height: 50px;line-height: 50px;">
        <div class="col-2" style="text-align: left;line-height: 50px;font-size: 2rem;" >
            <h2>评价表</h2>
        </div>
        <div class="col-10">
            <label for="name" >排序：</label>
            <select name="sort" class="form-control">
                <option value="">综合星级</option>
                <option value="1">商品质量</option>
                <option value="2">服务态度</option>
                <option value="3">描述相符</option>
                <option value="4">发货速度</option>
            </select>

            <label for="name" >姓名：</label>
            <input class="form-control" type="text"  id="name" name="name" value="{$name}" placeholder="姓名" />
            <label for="mobile" >手机：</label>
            <input class="form-control" type="text"  id="mobile" name="mobile" value="{$mobile}" placeholder="手机号码" />
            <button type="button" class="btn btn-warning query" style="vertical-align: middle;" >
                <span class="bi-search" ></span>
            </button>
        </div>
    </div>
     </form>

    <table class="table table-sm table-hover table-striped" >

        <thead>
            <th>序号</th>
            <th>评价人</th>
            <th>商家</th>
            <th>订单</th>
            <th>评价内容</th>
            <th>评价图片</th>
            <th>商品质量</th>
            <th>服务态度</th>
            <th>描述相符</th>
            <th>发货速度</th>
            <th>综合星</th>
            <th>评价日期</th>
            <th>
<!--               <button type="button" class="btn btn-sm btn-primary" id="news_add">
                  <span class="bi-plus-lg" style="color:white;"></span>
              </button> -->
            </th>
        </thead>

        <tbody>
            {foreach $list['data'] as $k=>$kv}
            <tr>
                <td>{$k+1}</td>
                <td>{$kv['from_name']}</td>
                <td>{$kv['to_name']}</td>
                <td>{$kv['order_no']}</td>
                <td>{$kv['text']}</td>
                <td><img src="{$kv['image']}" style="width:60px;" /></td>
                <td>{$kv['v1_star']}</td>
                <td>{$kv['v2_star']}</td>
                <td>{$kv['v3_star']}</td>
                <td>{$kv['v4_star']}</td>
                <td style="color:green;">{$kv['stars']}</td>
                <td>{$kv['create_time']}</td>
                <td>
                    <!-- <button style="button" class="btn btn-sm btn-info news_edit" news_id="{$kv['id']}" ><span class="bi-pencil"></span></button> -->
                </td>
            </tr>
            {/foreach}

        </tbody>    
    </table>

    {include file="common/pagination"}
  </div>

<script type="text/javascript">

    $(function(){
    $(".query").on('click',function(){
        var index = layer.load(0, {shade: false}); //0代表加载的风格，支持0-2

        $("form").submit();
        layer.close(index);
    }) 


      $("#news_add").on('click',function(){
        location.href="/index/news_edit";
      })      



      $(".news_edit").on('click',function(){
        var id = $(this).attr('news_id');
        var url ="/index/news_edit/id/"+id;
        console.log(url);
        location.href=url;
      })
    })

</script>


</body>
</html>
